﻿
using System.Collections.Generic;
using System.Linq;


namespace Spellchecker
{
    internal static class Wortverarbeiter
    {
        public static bool CheckWords( IEnumerable< string > wordsToCheck , Dictionary<string,bool> allowedWords )
        {
            if (wordsToCheck == null)
                return false;

            return wordsToCheck.
                Select(word => UpperCaser.MakeUpperCase(word)).
                Any(wordAsUpper => !allowedWords.ContainsKey(wordAsUpper));
        }
    }
}
